﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hos.ScheduleMaster.Core.Common;
using Hos.ScheduleMaster.Core.Models;

namespace Hos.ScheduleMaster.Core.Interface
{
    public interface IScheduleGroupService
    {

        /// <summary>
        /// 查询分组分页数据
        /// </summary>
        /// <param name="pager"></param>
        /// <returns></returns>
        ListPager<ScheduleGroupEntity> GetScheduleGroupPager(ListPager<ScheduleGroupEntity> pager);

        /// <summary>
        /// 根据id查询分组
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ScheduleGroupEntity GetScheduleGroupById(string id);
        /// <summary>
        /// 判断组名是否已存在
        /// </summary>
        /// <param name="groupName"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        bool CheckScheduleGroupName(string groupName, string id = "");

        /// <summary>
        /// 新增分组
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool AddScheduleGroup(ScheduleGroupEntity model);

        /// <summary>
        /// 编辑分组信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool EditScheduleGroup(ScheduleGroupEntity model);

        /// <summary>
        /// 查询所有分组
        /// </summary>
        /// <returns></returns>
        List<ScheduleGroupEntity> GetScheduleGroupAll();

        /// <summary>
        /// 检查能否删除分组
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool CanDelete(string id);

        /// <summary>
        /// 删除分组
        /// </summary>
        /// <param name="id"></param>
        bool DeleteGroupd(string id);
    }
}
